<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>鑫隆物业管理系统</title>

<link href="${ctx }/css/bootstrap.css" rel="stylesheet" />
<link href="${ctx}/css/bootstrapValidator.css" rel="stylesheet" />
<link href="${ctx }/css/font-awesome.min.css" rel="stylesheet" />
<link href="${ctx }/css/ace.min.css" rel="stylesheet" />
<script src="${ctx }/js/jquery-3.2.1.js" type="text/javascript"></script>
<script src="${ctx }/js/bootstrap.js" type="text/javascript"></script>
<script src="${ctx }/js/ace-extra.min.js" type="text/javascript"></script>
<script src="${ctx }/js/ace.min.js" type="text/javascript"></script>
<script src="${ctx }/js/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="${ctx }/js/WdatePicker.js" type="text/javascript"></script>
<script src="${ctx }/js/jquery.dataTables.bootstrap.js"
	type="text/javascript"></script>
<script src="${ctx }/js/bootstrapValidator.js" type="text/javascript"></script>

<script type="text/javascript">
	function logout() {
		$.ajax({
			type : "POST",
			url : "loginController/logout",
			success : function(result) {
				if (result.success) {
					window.location.href = 'loginController/toIndex';
				}
			}
		});
	};
	
	function pieChart(){
		window.location = "pieChart";
	}
	
	function productSale(){
		window.location = "productSale";
	}
</script>
<script type="text/javascript">
	jQuery(function($) {
		var oTable1 = $('#sample-table-2').dataTable({
			"aoColumns" : [ {
				"bSortable" : false
			}, null, null ]
		});

		$('table th input:checkbox').on(
				'click',
				function() {
					var that = this;
					$(this).closest('table').find(
							'tr > td:first-child input:checkbox').each(
							function() {
								this.checked = that.checked;
								$(this).closest('tr').toggleClass('selected');
							});

				});

		$('[data-rel="tooltip"]').tooltip({
			placement : tooltip_placement
		});

		function tooltip_placement(context, source) {
			var $source = $(source);
			var $parent = $source.closest('table')
			var off1 = $parent.offset();
			var w1 = $parent.width();

			var off2 = $source.offset();
			var w2 = $source.width();

			if (parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2))
				return 'right';
			return 'left';
		}
	})
</script>
</head>

<body>
	<div style="overflow-y: auto; overflow-x: auto; width: 2250px;">
		<!-- header -->
		<div class="navbar navbar-default" id="navbar">
			<script type="text/javascript">
				try {
					ace.settings.check('navbar', 'fixed')
				} catch (e) {
				}
			</script>

			<div class="navbar-container" id="navbar-container">
				<div class="navbar-header pull-left">
					<a href="#" class="navbar-brand"> <small> <i
							class="icon-leaf"></i> 鑫隆物业管理系统
					</small>
					</a>
					<!-- /.brand -->
				</div>
				<!-- /.navbar-header -->

				<div class="navbar-header pull-right" role="navigation">
					<ul class="nav ace-nav">
						<li class="grey"><a data-toggle="dropdown"
							class="dropdown-toggle" href="#"> <i
								class="icon-lock bigger-160"></i> 锁定
						</a></li>

						<li class="purple"><a data-toggle="dropdown"
							class="dropdown-toggle" href="#"> <i class="icon-wrench"></i>
								帮助
						</a></li>

						<li class="green"><a data-toggle="dropdown"
							class="dropdown-toggle" href="#"> <i
								class="icon-refresh bigger-230"></i> 刷新
						</a></li>

						<li class="light-blue"><a data-toggle="dropdown" href="#"
							class="dropdown-toggle"> <img class="nav-user-photo"
								src="${ctx }/images/user.jpg" alt="Jason's Photo" /> <span
								class="user-info"> <small>欢迎光临,</small>
									${sessionInfo.loginname }
							</span> <i class="icon-caret-down"></i>
						</a>

							<ul
								class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
								<li><a href="#"> <i class="icon-cog"></i> 设置
								</a></li>

								<li><a href="#"> <i class="icon-user"></i> 个人资料
								</a></li>

								<li class="divider"></li>

								<li><a onclick="logout()"> <i class="icon-off"></i> 退出
								</a></li>
							</ul></li>
					</ul>
					<!-- /.ace-nav -->
				</div>
				<!-- /.navbar-header -->
			</div>
			<!-- /.container -->
		</div>
		<!-- /header -->

		<!-- left -->
		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try {
					ace.settings.check('main-container', 'fixed')
				} catch (e) {
				}
			</script>

			<div class="main-container-inner">
				<a class="menu-toggler" id="menu-toggler" href="#"> <span
					class="menu-text"></span>
				</a>

				<div class="sidebar" id="sidebar">
					<script type="text/javascript">
						try {
							ace.settings.check('sidebar', 'fixed')
						} catch (e) {
						}
					</script>

					<div class="sidebar-shortcuts" id="sidebar-shortcuts">
						<div class="sidebar-shortcuts-large" id="sidebar-shortcuts-large">
							<button class="btn btn-success">
								<i class="icon-signal"></i>
							</button>

							<button class="btn btn-info">
								<i class="icon-pencil"></i>
							</button>

							<button class="btn btn-warning">
								<i class="icon-group"></i>
							</button>

							<button class="btn btn-danger">
								<i class="icon-cogs"></i>
							</button>
						</div>

						<div class="sidebar-shortcuts-mini" id="sidebar-shortcuts-mini">
							<span class="btn btn-success"></span> <span class="btn btn-info"></span>

							<span class="btn btn-warning"></span> <span
								class="btn btn-danger"></span>
						</div>
					</div>
					<!-- #sidebar-shortcuts -->

					<!-- 左侧菜单 -->
					<ul class="nav nav-list">
						<li class="active"><a href="#"> <i class="icon-dashboard"></i>
								<span class="menu-text"> 控制台 </span>
						</a></li>

						<li class="active open"><a href="#" class="dropdown-toggle"> <i
								class="icon-desktop"></i> <span class="menu-text"> 物业收费管理
							</span> <b class="arrow icon-angle-down"></b>
						</a>

							<ul class="submenu">
								<li><a href="${ctx }/dataController/treeGrid"> <i
										class="icon-double-angle-right"></i> 物业资料录入编辑
								</a></li>

								<li><a href="${ctx }/meterController/treeGrid"> <i
										class="icon-double-angle-right"></i> 物业固定收费抄录修改
								</a></li>

								<li><a href="${ctx }/chargeController/treeGrid"> <i
										class="icon-double-angle-right"></i> 物业收费单据录入编辑
								</a></li>

								<li><a href="${ctx }/chargeController/selectAll"> <i
										class="icon-double-angle-right"></i> 物业收费单据统计查询
								</a></li>

								<li><a href="${ctx }/meterController/selectAll"> <i
										class="icon-double-angle-right"></i> 物业收费明细统计查询
								</a></li>

								<%-- <li><a href="${ctx }/charge/account.jsp"> <i
									class="icon-double-angle-right"></i> 物业收费单据台账管理
							</a></li> --%>

								<li class="active"><a href="${ctx }/dataController/statistics"> <i
										class="icon-double-angle-right"></i> 物业数据统计报表
								</a></li>
								<%-- 
							<li><a href="${ctx }/charge/moneyChange.jsp"> <i
									class="icon-double-angle-right"></i> 物业金额数据更改
							</a></li> --%>
							</ul></li>

						<%-- <li><a href="#" class="dropdown-toggle"> <i
							class="icon-list"></i> <span class="menu-text"> 物业应收费用管理 </span>
							<b class="arrow icon-angle-down"></b>
					</a>

						<ul class="submenu">
							<li><a href="${ctx }/receivables/accountsReceivable.jsp">
									<i class="icon-double-angle-right"></i> 物业应收费用录入编辑
							</a></li>

							<li><a href="${ctx }/receivables/statistics.jsp"> <i
									class="icon-double-angle-right"></i> 物业应收费用统计查询
							</a></li>

							<li><a href="${ctx }/receivables/account.jsp"> <i
									class="icon-double-angle-right"></i> 物业应收费用台账管理
							</a></li>
						</ul></li> --%>

						<li><a href="#" class="dropdown-toggle"> <i
								class="icon-edit"></i> <span class="menu-text"> 物业日常管理 </span> <b
								class="arrow icon-angle-down"></b>
						</a>

							<ul class="submenu">
								<li><a href="${ctx }/familyController/familyAll"> <i
										class="icon-double-angle-right"></i> 住户家庭成员查询
								</a></li>

								<li><a href="${ctx }/repairsController/repairsAll"> <i
										class="icon-double-angle-right"></i> 物业报修管理
								</a></li>

								<li><a href="${ctx }/complaintController/ComplaintAll">
										<i class="icon-double-angle-right"></i> 物业投诉管理
								</a></li>

								<li><a href="${ctx }/repairsStatisticsController/selectAll">
										<i class="icon-double-angle-right"></i> 物业报修统计
								</a></li>

								<li><a
									href="${ctx }/complaintStatisticsController/complaintStatisticsAll">
										<i class="icon-double-angle-right"></i> 物业投诉统计
								</a></li>

								<li><a href="${ctx}/securityController/selectAll"> <i
										class="icon-double-angle-right"></i> 保安事件管理
								</a></li>

								<li><a href="${ctx}/depotController/selectAll"> <i
										class="icon-double-angle-right"></i> 停车场管理
								</a></li>

								<li><a href="${ctx }/maintenanceController/selectAll">
										<i class="icon-double-angle-right"></i> 维修工程管理
								</a></li>
							</ul></li>

						<li><a href="#" class="dropdown-toggle"> <i
								class="icon-tag"></i> <span class="menu-text"> 基本数据录入编辑 </span>
								<b class="arrow icon-angle-down"></b>
						</a>

							<ul class="submenu">
								<li><a href="${ctx }/payTypeController/treeGrid"> <i
										class="icon-double-angle-right"></i> 收费类别资料录入编辑
								</a></li>

								<li><a href="${ctx }/payItemsController/treeGrid"> <i
										class="icon-double-angle-right"></i> 收费项目资料录入编辑
								</a></li>


								<li><a href="${ctx }/stateController/treeGrid"> <i
										class="icon-double-angle-right"></i> 物业状态颜色录入编辑
								</a></li>


								<li><a href="${ctx }/companyController/treeGrid"> <i
										class="icon-double-angle-right"></i> 公司资料录入编辑
								</a></li>

								<li><a href="${ctx }/departmentController/treeGrid"> <i
										class="icon-double-angle-right"></i> 部门资料录入编辑
								</a></li>

								<li><a href="${ctx }/employeeController/treeGrid"> <i
										class="icon-double-angle-right"></i> 单位员工资料录入编辑
								</a></li>
							</ul></li>

						<li><a href="#" class="dropdown-toggle"> <i
								class="icon-tag"></i> <span class="menu-text"> 系统管理 </span> <b
								class="arrow icon-angle-down"></b>
						</a>

							<ul class="submenu">
								<li><a href="${ctx }/userController/selectAll"> <i
										class="icon-double-angle-right"></i> 用户管理
								</a></li>
								<%-- 
							<li><a href="error-500.html"> <i
									class="icon-double-angle-right"></i> 用户口令修改
							</a></li>

							<li><a href="grid.html"> <i
									class="icon-double-angle-right"></i> 数据备份
							</a></li>

							<li><a href="blank.html"> <i
									class="icon-double-angle-right"></i> 数据恢复
							</a></li>

							<li><a href="${ctx }/roleController/selectAll"> <i
									class="icon-double-angle-right"></i> 用户权限设置
							</a></li> --%>
							</ul></li>
					</ul>
					<!-- /左侧菜单 -->

					<!-- 左侧菜单缩放 -->
					<div class="sidebar-collapse" id="sidebar-collapse">
						<i class="icon-double-angle-left"
							data-icon1="icon-double-angle-left"
							data-icon2="icon-double-angle-right"></i>
					</div>
					<!-- /左侧菜单缩放 -->
				</div>

				<!-- /left -->

				<!-- right -->
				<div class="main-content">
					<div class="breadcrumbs" id="breadcrumbs">
						<ul class="breadcrumb">
							<li><i class="icon-home home-icon"></i> <a href="#">首页</a></li>
							<li class="active">控制台</li>
						</ul>
						<!-- .breadcrumb -->
					</div>

					<!-- table-->
					<div class="page-content">
						<div class="row">
							<div class="col-xs-12">
								<div class="table-responsive">
									<table id="sample-table-2"
										class="table table-striped table-bordered table-hover">
										<thead>
											<tr>
												<th class="center"><label> <input
														type="checkbox" class="ace" /> <span class="lbl"></span>
												</label></th>
												<th>状态</th>
												<th>物业用量</th>
											</tr>
										</thead>

										<tbody>
											<c:forEach items="${list }" var="piechartList">
												<c:if test="${piechartList.num != 0 }">
													<tr>
														<td class="center"><label> <input
																type="checkbox" class="ace" /> <span class="lbl"></span>
														</label></td>
														<td>${piechartList.name }</td>
														<td>${piechartList.num }</td>
													</tr>
												</c:if>
											</c:forEach>
										</tbody>
									</table>
								</div>
							</div>
							 <div style="height:50px" class="col-xs-12"></div>
							<div class="col-xs-12" style="background-color: gray;">
							   <div class="col-md-1 col-sm-1 col-xs-1">
									<a href="statistics"><input type="radio" name="imgs" onclick="pieChart()" /></a>显示饼状图
								</div>
								<div class="col-md-1 col-sm-1 col-xs-1">
									<a href="productSale"><input type="radio" name="imgs" onclick="productSale()" /></a>显示柱状图
								</div>
								<div class="col-md-10 col-sm-10 col-xs-10"></div>
							</div>
						</div>
					</div>
					${imgs }
				</div>
			</div>
		</div>
	</div>
</body>
</html>